﻿namespace Com.OpenCode.Framework.DevForm
{
    public static class StatusBarServices
    {
        public static event EditStatusValueDelegate Register;

        /// <summary>
        ///     设置状态栏的值。
        /// </summary>
        /// <param name="Statusvalue">值</param>
        /// <param name="index"></param>
        /// <param name="visible"></param>
        public static void SetStatusValues(object Statusvalue, int index, bool visible = true)
        {
            EditStatusValueArgs e = new EditStatusValueArgs
            {
                Index = index,
                Statusvalue = Statusvalue,
                Visible = visible
            };
            if (Register != null)
            {
                Register(e);
            }
        }
    }
}